@use 'variables' as *;

// 应用容器
.app-container {
  width: 100%;
  height: 100vh;
  display: flex;
  background-color: var(--bg-color);
  color: var(--text-color);
}

// 聊天容器
.chat-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  background-color: var(--bg-color);
  color: var(--text-color);
}

// 侧边栏
.chat-sidebar {
  background-color: var(--sidebar-color);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  transition: width 0.3s;
  overflow: hidden;
  width: $sidebar-width;
}

// 侧边栏头部
.sidebar-header {
  padding: $spacing-md;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);

  h2 {
    margin: 0;
    font-size: $font-size-medium;
    font-weight: 500;
  }
}

// 聊天列表
.chat-list {
  flex: 1;
  overflow: hidden;
}

// 聊天头部
.chat-header {
  background-color: var(--sidebar-color);
  color: var(--text-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  z-index: 10;
  height: $header-height;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 $spacing-md;
}

.header-left {
  display: flex;
  align-items: center;
  gap: $spacing-sm;
}

.header-right {
  display: flex;
  align-items: center;
  gap: $spacing-sm;

  .theme-toggle-btn {
    transition: none;
  }
}

.header-content h1 {
  margin: 0;
  font-size: $font-size-large;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.toggle-sidebar-btn {
  padding: $spacing-sm;
  margin-right: $spacing-xs;
}

// 聊天主体
.chat-main {
  flex-grow: 1;
  overflow-y: auto;
  padding: $spacing-lg 15%;
  background-color: var(--bg-color);
  position: relative;
}

// 空聊天提示
.empty-chat {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  text-align: center;
}

// 聊天底部
.chat-footer {
  padding: $spacing-md $spacing-lg;
  background-color: var(--sidebar-color);
  border-top: 1px solid var(--border-color);
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.05);

  // 思考模式切换按钮
  .thinking-mode-toggle {
    display: flex;
    align-items: center;
    margin-bottom: $spacing-sm;

    .el-switch {
      margin-right: $spacing-sm;
    }

    .info-icon {
      color: var(--text-color);
      opacity: 0.6;
      cursor: pointer;
      font-size: $font-size-small;

      &:hover {
        opacity: 1;
      }
    }
  }
}
